package mk.jug.academy.service;

import javax.persistence.NoResultException;

import mk.jug.academy.dao.AdministratorDAO;
import mk.jug.academy.model.Administrator;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Implementation for the {@link AdministratorService}.
 *
 * @author Ice.Penov
 */
@Service
public class AdministratorServiceImpl implements AdministratorService {
	
	@Autowired private AdministratorDAO administratorDAO;
	
	@Override
	public Administrator findByEmail(String email) {
		Administrator admin = null;
		try {
			admin = administratorDAO.findByEmail(email);
		} catch (NoResultException e) {
			;
		}
		return admin;
	}
	
}